package com.scs.application.modules.dept.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityIndexAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
/**
 * <p>
 *
 * </p>
 *
 */
@Data
@Accessors(chain = true)
@TableName("dept_apply_auto_history")
@EntityClassAnnotation(remark = "自动请领单历史表")
@EntityIndexAnnotation(ix = {"ref_apply_item_id","status"})
public class ApplyAutoHistory extends DataEntity {




    @EntityFieldAnnotation(
            text = "已拣货单品数量",
            length = "",
            not_null = false,
            default_value = "0.0000",
            comment = ""
    )
    private Double pickedSkuQty;

    @EntityFieldAnnotation(
            text = "是否是调拨 | 1:调拨 | 0:配送",
            length = "",
            not_null = false,
            default_value = "1",
            comment = ""
    )
    private Boolean flagTransfer;

    @EntityFieldAnnotation(
            text = "来源请领明细id",
            length = "20",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String refApplyItemId;
    // id ,在父类中处理
    @EntityFieldAnnotation(
            text = "来源类型,比如采购 科室安全库存 科室请领" +
                    " | AUTO_ 自动生成 | dept_apply 请领生成",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String refType;
    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "申请仓库ID",
            length = "",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private String applyWarehouseId;

    @EntityFieldAnnotation(
            text = "申请仓库名称",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String applyWarehouseName;

    @EntityFieldAnnotation(
            text = "目标仓库ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String warehouseId;

    @EntityFieldAnnotation(
            text = "目标仓库名称",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String warehouseName;

    @EntityFieldAnnotation(
            text = "物料ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String matrId;

    @EntityFieldAnnotation(
            text = "状态",
            length = "10",
            not_null = false,
            default_value = "0",
            comment = "1：正常结束 -1：废弃"
    )
    private String status;

    @EntityFieldAnnotation(
            text = "物料名称",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String matrName;

    @EntityFieldAnnotation(
            text = "物料品规",
            length = "100",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String matrSpec;

    @EntityFieldAnnotation(
            text = "单位",
            length = "10",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String skuUnit;

    @EntityFieldAnnotation(
            text = "日消耗量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double skuQtyDaily;

    @EntityFieldAnnotation(
            text = "安全库存",
            length = "",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Double skuQtySafety;

    @EntityFieldAnnotation(
            text = "要求单位",
            length = "10",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String requiredUnit;

    @EntityFieldAnnotation(
            text = "需求创建时的库存数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double skuQtyStock0;

    @EntityFieldAnnotation(
            text = "创建时的自动请领数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double skuQtyApply0;

    @EntityFieldAnnotation(
            text = "请领时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private LocalDateTime gmtApply;

    @EntityFieldAnnotation(
            text = "最新请领仓库库存数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double skuQtyStock;

    @EntityFieldAnnotation(
            text = "最新的自动请领数量",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private Double skuQtyApply;

    @EntityFieldAnnotation(
            text = "最后更新时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private LocalDateTime gmtUpdate;

    @EntityFieldAnnotation(
            text = "关联配送单/调拨单ID",
            length = "20",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String refId;

    @EntityFieldAnnotation(
            text = "响应时间：配送调拨的创建时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private LocalDateTime gmtResponse;

    @EntityFieldAnnotation(
            text = "完成时间：配送调拨单的收货时间",
            length = "",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private LocalDateTime gmtComplete;


    @EntityFieldAnnotation(
            text = "需求级别",
            not_null = false,
            default_value = "0",
            comment = "0常规，1紧急，特别紧急"
    )
    private String demandLevel;

    @EntityFieldAnnotation(
            text = "备注",
            length = "300",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remark;


    @EntityFieldAnnotation(
            text = "要求单位比率",
            length = "10",
            not_null = false,
            default_value = "1",
            comment = ""
    )
    private Double requiredRate;

    @EntityFieldAnnotation(
            text = "申请科室名称",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String deptName;


    // creator ,在父类中处理


    // gmt_create ,在父类中处理


    // modifier ,在父类中处理


    // gmt_modified ,在父类中处理

    @EntityFieldAnnotation(
            text = "耗材型号",
            length = "100",
            not_null = false,
            default_value = "",
            comment = "耗材型号"
    )
    private String matrModel;

}
